﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes.virals {
    import Engine.Classes.*;
    import Engine.Transactions.*;

    public class TCityStreamPublish extends TStreamPublish {

        protected var m_userMessage:String;
        protected var m_callback:Function;
        protected var m_autoPublish:Boolean;

        public function TCityStreamPublish(_arg1:String, _arg2:Object, _arg3:String=null, _arg4:Object=null, _arg5:String=null, _arg6:String=null, _arg7:Function=null, _arg8:Boolean=false){
            this.m_userMessage = _arg6;
            this.m_autoPublish = _arg8;
            this.m_callback = _arg7;
            super(_arg1, _arg2, _arg3, _arg4, _arg5);
        }
        override public function perform():void{
            signedCall("UserService.streamPublish", m_type, m_data, m_targetId, m_clickthorugh_params, m_subtype, this.m_autoPublish, this.m_userMessage);
        }
        override protected function onComplete(_arg1:Object):void{
            var _local2:int;
            if ((GlobalEngine.socialNetwork is SNAPISocialNetwork)){
                (GlobalEngine.socialNetwork as SNAPISocialNetwork).snapiStreamPublish(_arg1);
            } else {
                GlobalEngine.socialNetwork.streamPublish(_arg1.attachment, _arg1.action_link, _arg1.target_id, _arg1.user_message_prompt, null, _arg1.auto_publish, _arg1.message);
            };
            if (this.m_callback != null){
                _local2 = (_arg1.auto_publish) ? ViralManager.STREAM_PUBLISH_AUTO : ViralManager.STREAM_PUBLISH_DEFAULT;
                this.m_callback(_local2);
            };
        }

    }
}//package Classes.virals 
